﻿namespace UnityEngine
{
    using System;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;

    public sealed class Animator : Behaviour
    {
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void ForceStateNormalizedTime(float normalizedTime);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern AnimatorTransitionInfo GetAnimatorTransitionInfo(int layerIndex);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern Transform GetBoneTransform(HumanBodyBones humanBoneId);
        public bool GetBool(int id)
        {
            return this.GetBoolID(id);
        }

        public bool GetBool(string name)
        {
            return this.GetBoolString(name);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern bool GetBoolID(int id);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern bool GetBoolString(string name);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern AnimationInfo[] GetCurrentAnimationClipState(int layerIndex);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern AnimatorStateInfo GetCurrentAnimatorStateInfo(int layerIndex);
        public float GetFloat(int id)
        {
            return this.GetFloatID(id);
        }

        public float GetFloat(string name)
        {
            return this.GetFloatString(name);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern float GetFloatID(int id);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern float GetFloatString(string name);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern Vector3 GetIKPosition(AvatarIKGoal goal);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern float GetIKPositionWeight(AvatarIKGoal goal);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern Quaternion GetIKRotation(AvatarIKGoal goal);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern float GetIKRotationWeight(AvatarIKGoal goal);
        public int GetInteger(int id)
        {
            return this.GetIntegerID(id);
        }

        public int GetInteger(string name)
        {
            return this.GetIntegerString(name);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern int GetIntegerID(int id);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern int GetIntegerString(string name);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern string GetLayerName(int layerIndex);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern float GetLayerWeight(int layerIndex);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern AnimationInfo[] GetNextAnimationClipState(int layerIndex);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern AnimatorStateInfo GetNextAnimatorStateInfo(int layerIndex);
        public Quaternion GetQuaternion(int id)
        {
            return this.GetQuaternionID(id);
        }

        public Quaternion GetQuaternion(string name)
        {
            return this.GetQuaternionString(name);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern Quaternion GetQuaternionID(int id);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern Quaternion GetQuaternionString(string name);
        public Vector3 GetVector(int id)
        {
            return this.GetVectorID(id);
        }

        public Vector3 GetVector(string name)
        {
            return this.GetVectorString(name);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern Vector3 GetVectorID(int id);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern Vector3 GetVectorString(string name);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_MatchTarget(Animator self, ref Vector3 matchPosition, ref Quaternion matchRotation, AvatarTarget targetBodyPart, ref MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_SetIKPosition(Animator self, AvatarIKGoal goal, ref Vector3 goalPosition);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_SetIKRotation(Animator self, AvatarIKGoal goal, ref Quaternion goalRotation);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_SetLookAtPosition(Animator self, ref Vector3 lookAtPosition);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_SetQuaternionID(Animator self, int id, ref Quaternion value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_SetQuaternionString(Animator self, string name, ref Quaternion value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_SetVectorID(Animator self, int id, ref Vector3 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_SetVectorString(Animator self, string name, ref Vector3 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_bodyPosition(out Vector3 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_bodyRotation(out Quaternion value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_rootPosition(out Vector3 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_rootRotation(out Quaternion value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_set_bodyPosition(ref Vector3 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_set_bodyRotation(ref Quaternion value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_set_rootPosition(ref Vector3 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_set_rootRotation(ref Quaternion value);
        public void InterruptMatchTarget()
        {
            bool completeMatch = true;
            this.InterruptMatchTarget(completeMatch);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void InterruptMatchTarget(bool completeMatch);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern bool IsControlled(Transform transform);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern bool IsInTransition(int layerIndex);
        public bool IsParameterControlledByCurve(int id)
        {
            return this.IsParameterControlledByCurveID(id);
        }

        public bool IsParameterControlledByCurve(string name)
        {
            return this.IsParameterControlledByCurveString(name);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern bool IsParameterControlledByCurveID(int id);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern bool IsParameterControlledByCurveString(string name);
        public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime)
        {
            float targetNormalizedTime = 1f;
            INTERNAL_CALL_MatchTarget(this, ref matchPosition, ref matchRotation, targetBodyPart, ref weightMask, startNormalizedTime, targetNormalizedTime);
        }

        public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime)
        {
            INTERNAL_CALL_MatchTarget(this, ref matchPosition, ref matchRotation, targetBodyPart, ref weightMask, startNormalizedTime, targetNormalizedTime);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        internal extern void PlaybackRecordedFrame(float time);
        public void SetBool(int id, bool value)
        {
            this.SetBoolID(id, value);
        }

        public void SetBool(string name, bool value)
        {
            this.SetBoolString(name, value);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void SetBoolID(int id, bool value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void SetBoolString(string name, bool value);
        public void SetFloat(int id, float value)
        {
            this.SetFloatID(id, value);
        }

        public void SetFloat(string name, float value)
        {
            this.SetFloatString(name, value);
        }

        public void SetFloat(int id, float value, float dampTime, float deltaTime)
        {
            this.SetFloatIDDamp(id, value, dampTime, deltaTime);
        }

        public void SetFloat(string name, float value, float dampTime, float deltaTime)
        {
            this.SetFloatStringDamp(name, value, dampTime, deltaTime);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void SetFloatID(int id, float value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void SetFloatIDDamp(int id, float value, float dampTime, float deltaTime);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void SetFloatString(string name, float value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void SetFloatStringDamp(string name, float value, float dampTime, float deltaTime);
        public void SetIKPosition(AvatarIKGoal goal, Vector3 goalPosition)
        {
            INTERNAL_CALL_SetIKPosition(this, goal, ref goalPosition);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void SetIKPositionWeight(AvatarIKGoal goal, float value);
        public void SetIKRotation(AvatarIKGoal goal, Quaternion goalRotation)
        {
            INTERNAL_CALL_SetIKRotation(this, goal, ref goalRotation);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void SetIKRotationWeight(AvatarIKGoal goal, float value);
        public void SetInteger(int id, int value)
        {
            this.SetIntegerID(id, value);
        }

        public void SetInteger(string name, int value)
        {
            this.SetIntegerString(name, value);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void SetIntegerID(int id, int value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void SetIntegerString(string name, int value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void SetLayerWeight(int layerIndex, float weight);
        public void SetLookAtPosition(Vector3 lookAtPosition)
        {
            INTERNAL_CALL_SetLookAtPosition(this, ref lookAtPosition);
        }

        public void SetLookAtWeight(float weight)
        {
            float clampWeight = 0.5f;
            float eyesWeight = 0f;
            float headWeight = 1f;
            float bodyWeight = 0f;
            this.SetLookAtWeight(weight, bodyWeight, headWeight, eyesWeight, clampWeight);
        }

        public void SetLookAtWeight(float weight, float bodyWeight)
        {
            float clampWeight = 0.5f;
            float eyesWeight = 0f;
            float headWeight = 1f;
            this.SetLookAtWeight(weight, bodyWeight, headWeight, eyesWeight, clampWeight);
        }

        public void SetLookAtWeight(float weight, float bodyWeight, float headWeight)
        {
            float clampWeight = 0.5f;
            float eyesWeight = 0f;
            this.SetLookAtWeight(weight, bodyWeight, headWeight, eyesWeight, clampWeight);
        }

        public void SetLookAtWeight(float weight, float bodyWeight, float headWeight, float eyesWeight)
        {
            float clampWeight = 0.5f;
            this.SetLookAtWeight(weight, bodyWeight, headWeight, eyesWeight, clampWeight);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void SetLookAtWeight(float weight, float bodyWeight, float headWeight, float eyesWeight, float clampWeight);
        public void SetQuaternion(int id, Quaternion value)
        {
            this.SetQuaternionID(id, value);
        }

        public void SetQuaternion(string name, Quaternion value)
        {
            this.SetQuaternionString(name, value);
        }

        private void SetQuaternionID(int id, Quaternion value)
        {
            INTERNAL_CALL_SetQuaternionID(this, id, ref value);
        }

        private void SetQuaternionString(string name, Quaternion value)
        {
            INTERNAL_CALL_SetQuaternionString(this, name, ref value);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void SetTarget(AvatarTarget targetIndex, float targetNormalizedTime);
        public void SetVector(int id, Vector3 value)
        {
            this.SetVectorID(id, value);
        }

        public void SetVector(string name, Vector3 value)
        {
            this.SetVectorString(name, value);
        }

        private void SetVectorID(int id, Vector3 value)
        {
            INTERNAL_CALL_SetVectorID(this, id, ref value);
        }

        private void SetVectorString(string name, Vector3 value)
        {
            INTERNAL_CALL_SetVectorString(this, name, ref value);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        internal extern void StartRecording();
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        internal extern void StopRecording();
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern int StringToHash(string name);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        internal extern void Update(float deltaTime);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        internal extern void WriteDefaultPose();

        public bool animatePhysics { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public bool applyRootMotion { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public Avatar avatar { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public Vector3 bodyPosition
        {
            get
            {
                Vector3 vector;
                this.INTERNAL_get_bodyPosition(out vector);
                return vector;
            }
            set
            {
                this.INTERNAL_set_bodyPosition(ref value);
            }
        }

        public Quaternion bodyRotation
        {
            get
            {
                Quaternion quaternion;
                this.INTERNAL_get_bodyRotation(out quaternion);
                return quaternion;
            }
            set
            {
                this.INTERNAL_set_bodyRotation(ref value);
            }
        }

        public AnimatorCullingMode cullingMode { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public Vector3 deltaPosition { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public Quaternion deltaRotation { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public float feetPivotActive { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public float gravityWeight { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public float humanScale { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public bool isHuman { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public bool isMatchingTarget { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public int layerCount { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public bool layersAffectMassCenter { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public Vector3 pivotPosition { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public float pivotWeight { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public Vector3 rootPosition
        {
            get
            {
                Vector3 vector;
                this.INTERNAL_get_rootPosition(out vector);
                return vector;
            }
            set
            {
                this.INTERNAL_set_rootPosition(ref value);
            }
        }

        public Quaternion rootRotation
        {
            get
            {
                Quaternion quaternion;
                this.INTERNAL_get_rootRotation(out quaternion);
                return quaternion;
            }
            set
            {
                this.INTERNAL_set_rootRotation(ref value);
            }
        }

        public float speed { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public bool stabilizeFeet { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        internal bool supportsOnAnimatorMove { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public Vector3 targetPosition { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        private Quaternion _targetRotation;
        public Quaternion targetRotation { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get { return _targetRotation; } }
    }
}

